<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('Cate/index')}">{:lang('CATE_TITLE')}</a></li>
			<li><a href="{:url('Cate/add')}">{:lang('ADD_CATE')}</a></li>
            <li class="active"><a href="{:url('Cate/edit', array('id'=>lang('request.id/s','')))}">{:lang('EDIT_INFO')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="{:url('Cate/edit_post')}">
			<fieldset>
            <input type="hidden" name="mark" value="normal">
            	<div class="control-group">
					<label class="control-label">{:lang('P_CATE')}</label>
					<div class="controls">
						<select name="parent_id" class="form-control">
                        	<option value="0" <if condition="$parent_id eq 0">selected</if>>{:lang('P_CATE_ITEM')}</option>
                            <foreach name='cates' item='vo'>
                            	<option value="{$vo.id}" <if condition="$parent_id eq $vo['id']">selected</if>>{$vo.cate_name}</option>
                            </foreach>
                        </select>
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">{:lang('CATE_NAME')}</label>
					<div class="controls">
						<input type="text" name="cate_name" value="{$cate_name}" class="form-control">
                        <input type="hidden" name="id" value="{$id}">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">{:lang('SORT_ORDER')}</label>
					<div class="controls">
						<input type="text" name="sort_order" value="{$sort_order}" class="form-control">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">{:lang('IF_SHOW')}</label>
					<div class="controls">
						<input type="radio" name="if_show" value="1" <if condition="$if_show eq 1">checked</if> />&nbsp;{:lang('YES')}
						<input type="radio" name="if_show" value="0" <if condition="$if_show eq 0">checked</if> />&nbsp;{:lang('NO')}
					</div>
				</div>                
			</fieldset>
			<div class="form-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
				<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
</body>
</html>